﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;

namespace LDM.Business.ServiceAPI.Model.DBModel
{
    /// <summary>
    /// Class SystemConfig.
    /// </summary>
    public class SystemConfig
    {
        /// <summary>
        /// 获取或设置系统密钥。
        /// </summary>
        /// <value>The system key.</value>
        public string SystemKey { get; set; }


        #region QQ授权登录参数
        /// <summary>
        /// QQappId
        /// 绑定QQ的APPID
        /// </summary>
        /// <value>The system key.</value>
        public string QQAppID { get; set; }
        /// <summary>
        /// QQappId
        /// 绑定QQ的APPID
        /// </summary>
        /// <value>The system key.</value>
        public string QQAppSecret { get; set; }

        /// <summary>
        /// QQ回调地址
        /// </summary>
        /// <value>The system key.</value>
        public string QQCallbackUrl { get; set; }

        #endregion

        #region 微信支付参数
        /// <summary>
        /// 微信appId
        /// 绑定支付的APPID
        /// </summary>
        /// <value>The system key.</value>
        public string WxAppID { get; set; }

        /// <summary>
        /// 微信商户号
        /// 商户号（必须配置）
        /// </summary>
        /// <value>The system key.</value>
        public string WxMchID { get; set; }


        /// <summary>
        /// 商户支付密钥，参考开户邮件设置（必须配置），请妥善保管，避免密钥泄露
        /// </summary>
        /// <value>The system key.</value>
        public string WxMchKey { get; set; }


        /// <summary>
        /// 微信AppSecret
        /// 公众帐号secert（仅JSAPI支付的时候需要配置），请妥善保管，避免密钥泄露
        /// </summary>
        /// <value>The system key.</value>
        public string WxAppSecret { get; set; }


        /// <summary>
        /// 支付结果通知回调url，用于商户接收支付结果
        /// </summary>
        public string WxNotifyUrl { get; set; }

        /// <summary>
        /// 商户系统后台机器IP
        /// </summary>
        public string WxMchIP { get; set; }


        /// <summary>
        /// 测速上报等级，0.关闭上报; 1.仅错误时上报; 2.全量上报
        /// </summary>
        public int WxReportLevel { get; set; }

        /// <summary>
        ///  //=======【证书路径设置】===================================== 
        /// * 证书路径,注意应该填写绝对路径（仅退款、撤销订单时需要）
        /// * 1.证书文件不能放在web服务器虚拟目录，应放在有访问权限控制的目录中，防止被他人下载；
        /// * 2.建议将证书文件名改为复杂且不容易猜测的文件
        /// * 3.商户服务器要做好病毒和木马防护工作，不被非法侵入者窃取证书文件。
        /// </summary>
        public string WxSSlCertPath { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public string WxSSlCertPassword { get; set; }


        #endregion

        #region 微信小程序参数
        /// <summary>
        /// 微信appId
        /// 绑定支付的APPID
        /// </summary>
        /// <value>The system key.</value>
        public string WxProAppID { get; set; }

        /// <summary>
        /// 微信appId
        /// 绑定支付的APPID
        /// </summary>
        /// <value>The system key.</value>
        public string WxProAppSecret { get; set; }
        #endregion


        #region 支付宝参数
        /// <summary>
        /// 支付宝公钥
        /// </summary>
        public string AlipayPublicKey { get; set; }
        /// <summary>
        /// 原始私钥/开发者私钥
        /// </summary>
        public string MerchantPrivateKey { get; set; }
        /// <summary>
        /// 开发者公钥
        /// </summary>
        public string MerchantPublicKey { get; set; }
        /// <summary>
        /// 支付宝APPID
        ///  绑定支付的APPID
        /// </summary>
        public string AlipayAppId { get; set; }
        /// <summary>
        /// 合作伙伴ID：partnerID
        /// </summary>
        public string AlipayPid { get; set; }
        /// <summary>
        /// 支付宝网关地址
        /// </summary>
        public string ServerUrl { get; set; }

        /// <summary>
        /// 支付宝支付异步通知地址
        /// </summary>
        public string AliNotifyUrl { get; set; }
        #endregion
    }


    /// <summary>
    /// Class SystemConfig.
    /// </summary>
    [SugarTable("System_Config")]
    public class SystemConfigPO
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        /// <summary>
        /// 配置名称
        /// </summary>
        public int ConfigId { get; set; }

        /// <summary>
        /// 配置名称
        /// </summary>
        public string ConfigName { get; set; }

        /// <summary>
        /// 配置值
        /// </summary>
        public string ConfigValue { get; set; }

        /// <summary>
        /// 配置描述
        /// </summary>
        public string Description { get; set; }
    }
}
